#include <iostream>

#include <log4cxx/logger.h>
#include <log4cxx/xml/domconfigurator.h>

#define LOG_CONF_FILE "sscf_test_log.xml"

#define MY_LOGGER_NAME "shadow.sscf.test"

#include "SSCF.h"

using std::cout;
using std::endl;

log4cxx::LoggerPtr g_logger = log4cxx::Logger::getLogger(MY_LOGGER_NAME);

int read_evnet_handler(SSocket * ps, void * arg) {
	string buf;
	int res = ps->recv_any(buf, -1);
	cout << "socket data arrive, recv res:" << res << ", data:" << buf << endl;
	return res;
}

int main(int argc, char * argv[]) {
	log4cxx::xml::DOMConfigurator::configure(LOG_CONF_FILE);
	SSCF sscf;
	sscf.init(5566, 10, 30, read_evnet_handler, NULL);
	int res = sscf.start_svc();
	cout << "....oops..." << endl;
	return -1;
}
